package com.wwz.service;

import com.wwz.pojo.Room;
import com.wwz.pojo.RoomQuery;
import org.apache.catalina.User;
import org.springframework.data.domain.Page;

import java.util.List;

public interface RoomService {

    Room add(Room room);

    void delete(Integer id);

    Room upData(Integer id,Room room);

    List<Room> findAll();

    Room getOne(Integer id);

    /**
     * 简单分页
     * @param page
     * @param size
     * @return
     */
    Page<Room> toPage(Integer page, Integer size);

    /**
     * 待条件分页查询
     * @param page
     * @param size
     * @param query
     * @return
     */
    Page<Room> toPage2(Integer page, Integer size, RoomQuery query);
}
